package com.lomboardrisk.app.ee_new.xsd.util;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.TreeMap;

import org.apache.log4j.Logger;

public class FlexiblePageLookupUtils {

	private static final Logger log = Logger
			.getLogger(FlexiblePageLookupUtils.class);

	public static Map<String, String> getMarginCallStatuses() {
		
		//"0":" ","65":"Pending Review","58":"No Call Required","204":"Waived","205":"Completed","150":"------","55":"Margin Request Issued","56":"Margin Request Confirmed","145":"Partial Dispute","146":"Full Dispute","389":"Partial dispute & Full dispute","59":"Margin Request Received","149":"Collateral Booked"

		Map<String, String> marginCallStatus = new HashMap<String, String>();
		
		marginCallStatus.put("0", " ");
		marginCallStatus.put("65", "Pending Review");
		marginCallStatus.put("58", "No Call Required");
		marginCallStatus.put("204", "Waived");
		marginCallStatus.put("205", "Completed");
		
		return marginCallStatus;
		

	}

	public static TreeMap getUserDefinedExposureStatus() throws Exception {
		
//		{"0":"&nbsp;","496":"Sub Request Received","497":"Sub Request Made"}}
		
		TreeMap<String, String> udfCallStatus = new TreeMap<String, String>();
		udfCallStatus.put("0", "&nbsp;");
		udfCallStatus.put("496", "Sub Request Received");
		udfCallStatus.put("497", "Sub Request Made");
		
		return udfCallStatus;
	}

	public static HashMap<String, String> getAllColManagers()
			throws Exception {
		HashMap<String, String> result = findAllColManagers();
		return result;
	}
	
	private static HashMap<String, String> findAllColManagers() {

//		{"0":" ","London Derivatives Collateral Desk   - null":"London Derivatives Collateral Desk   - null","London Derivatives Collateral  Desk - null":"London Derivatives Collateral  Desk - null","London Derivatives Collateral Desk - null":"London Derivatives Collateral Desk - null","Ben Aston - null":"Ben Aston - null","P1 Sub1 - null":"P1 Sub1 - null","OTC COLLATERAL DESK - Collateral Team":"OTC COLLATERAL DESK - Collateral Team","ABN Asset Management Ltd - null":"ABN Asset Management Ltd - null","P1 - null":"P1 - null"}
    	
    	HashMap<String,String> results = new LinkedHashMap<String,String>();
    	results.put("0", " ");
    	results.put("London Derivatives Collateral Desk   - null", "London Derivatives Collateral Desk   - null");
    	results.put("Ben Aston - null", "Ben Aston - null");
    
    	return results; 
   	
    }
	
	public static HashMap<String, String> getNettingMTMAndIA() {
		HashMap nettingRules = new LinkedHashMap();
		
		nettingRules.put("1", "Net");
		nettingRules.put("2", "Gross");
		
		return nettingRules;
	}
	
	public static  HashMap<String, String> getAllActionTypes() {
		
		HashMap actionTypes = new LinkedHashMap();
		actionTypes.put(String.valueOf("52"), "Call");
		actionTypes.put(String.valueOf("51"), "Recall");
		
		return actionTypes;
		
	}
	
	public static Map<String, String> getWorkflowTest() {
		Map<String, String> workFlow = new HashMap<String, String>();
		
		workFlow.put("68", "Approved");
		workFlow.put("69", "Amended");
		workFlow.put("70", "Amended-Waived");
		
		return workFlow;
	}

}
